package com.hfxt.entity;

import com.hfxt.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
//        User user=new User();
//        user.setName("郭老师");
//        user.setSay("好好学习java");
//        user.print();
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
//        User user=(User)context.getBean("show");
//        user.print();
        UserService userService = (UserService) context.getBean("userService");
        userService.addUser(new User());
        userService.delUser(1);

    }
}
